/**
 * @file   TcpClient.h
 * @author Djuro Drljaca (djurodrljaca@gmail.com)
 * @date   2013-05-18
 * @brief  Test DataBus TCP Client.
 *
 * Copyright (C) 2013  Djuro Drljaca <djurodrljaca@gmail.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef TESTTCPCLIENT_H
#define TESTTCPCLIENT_H

#include <DataBus/Client/TcpClient.h>

class TestTcpClient : public DataBus::TcpClient
{
    Q_OBJECT

public:
    explicit TestTcpClient(QObject *parent = 0);

    ~TestTcpClient();
    
signals:
    void packetReceived(DataBus::Packet packet);

private:
    TestTcpClient(const TestTcpClient &);
    TestTcpClient &operator=(const TestTcpClient &);

    void processReceivedPacket(const DataBus::Packet &packet);
    QList<quint8> getPropertyIdList() const;
    bool getPropertyInfo(const quint8 propertyId, DataBus::PropertyInfo *propertyInfo) const;
    bool getPropertyValue(const quint8 propertyId, DataBus::Value *propertyValue);
    bool setPropertyValue(const quint8 propertyId, const DataBus::Value &propertyValue);

    QList<DataBus::PropertyInfo> m_propertyInfoList;

    qint32 m_testPropertyValue;
};

#endif // TESTTCPCLIENT_H
